% GAUTIER LE BIHAN - 2020
% Replication files for "Shocks vs Menu Costs: Patterns of Price Rigidity in an Estimated Multi-Sector Menu-Cost Model?" Review of Economics and Statistics
%
% This code produces Figure P

clear
clc
close all

lag=3;
max_x=28;
c=1.5

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MULTISECT %%%%%%%%%%%%%%%%%%�

load '..\..\IRF\VC_aggregate_IRF\IRF_agg_20'
IRF_med=IRF_agg_20(1,:)'
IRF_mean=IRF_agg_20(2,:)'

load ..\..\IRF\VC_2sectors\IRF_mean2_19d
IRF_2sect=IRF_mean2_19d(1,:)';
load ..\..\IRF\VC_3sectors\IRF_mean3_19b
IRF_3sect=IRF_mean3_19b(1,:)';
load ..\..\IRF\VC_4sectors\IRF_mean4_2019d
IRF_4sect=IRF_mean4_2019d(1,:)';
 
x=1:1:max_x;
 figure; 
 mygraph= plot(x, IRF_med(1+lag:max(x)+lag),'-k', x, IRF_mean(1+lag:max(x)+lag),'--k',x, IRF_2sect(1+lag:max(x)+lag),':k',x, IRF_3sect(1+lag:max(x)+lag),'ok', x, IRF_4sect(1+lag:max(x)+lag),'*k'); 
 grid on;
 set(mygraph,'Linewidth',1);
 axis([1 max(x) 0 0.0025])
 xlabel('Months') % x-axis label
ylabel('Output response') % y-axis label
 
 hold on 

 load ..\..\IRF\VC_mutisector_range_kurcor\IRFall1
 IRF_multi=IRFall1(1).IRFall1
IRF_max=max(IRF_multi')';
IRF_min=min(IRF_multi')';

ha =shadedplot(x, IRF_min(1+lag:max(x)+lag)', IRF_max(1+lag:max(x)+lag)', [0.7 0.7 0.7]);

legend('1 sector - Median moments', '1 sector - Mean moments', '2 sectors', '3 sectors','4 sectors','Multi-sector 5 to 17 sectors');

 

 
 